#include "List.h"

void TestList1()
{
	LTNode* plist=LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPopBack(plist);
	LTPrint(plist);
	printf("\n");
	LTPushFront(plist, 9);
	LTPushFront(plist, 8);
	LTPushFront(plist, 7);
	LTPopFront(plist);
	LTPopFront(plist);
	LTPrint(plist);
}

void TestList2()
{
	LTNode* plist = LTInit();
	LTPushBack(plist, 1);
	LTPushBack(plist, 2);
	LTPushBack(plist, 3);
	LTPushBack(plist, 4);
	LTPrint(plist);
	printf("\n");
	LTNode* pos = LTFind(plist, 3);
	if (pos != NULL)
	{
		LTErase(pos);
		pos = NULL;
	}
	LTPrint(plist);

	LTDestory(plist);
	plist = NULL;
	LTDestory(plist);
}


int main()
{
	//TestList1();
	TestList2();
	return 0;
}